-
Notifications
You must be signed in to change notification settings - Fork 364
Bypass feature validation for dynamic tenant features #9523
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Bypass feature validation for dynamic tenant features #9523
Conversation
As discussed
|
Closing in favor of #9527 |
c8c8ee5
to
c816791
Compare
c816791
to
6484ca9
Compare
cc @asirvadAbrahamVarghese I used some of your pre-canned functions for the cypress test - let me know if you have better options than what I used. |
cy.toolbar(toolBarConfigMenu, 'Add child Tenant to this Tenant'); | ||
cy.get('input#name').type(initialTenantName); | ||
cy.get('input#description').type(initialTenantDescription); | ||
cy.contains('.bx--btn--primary', 'Add').click(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if this is a form can you try using getFormFooterButtonByType
cy.getFormFooterButtonByType('Add', 'submit')
should work (not sure about the html button type here)
]); | ||
|
||
cy.toolbar(toolBarConfigMenu, 'Add child Tenant to this Tenant'); | ||
cy.get('input#name').type(initialTenantName); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here we can use getFormInputFieldById
cy.getFormInputFieldById('name').type(initialTenantName);
should be good.
|
||
cy.toolbar(toolBarConfigMenu, 'Add child Tenant to this Tenant'); | ||
cy.get('input#name').type(initialTenantName); | ||
cy.get('input#description').type(initialTenantDescription); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
similar to above: cy.getFormInputFieldById('description').type(initialTenantDescription);
I haven't come across many form elements yet, but using these commands consistently across tests will help us generalize the selectors in here 😃 |
// flash message assertions | ||
flashMessageOperationAdded: 'added', | ||
flashMessageOperationDeleted: 'delete', | ||
flashTypeSuccess: 'success', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wanted to use a constant for the flash message type to avoid repetition, but forgot to follow through: #9554
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll do that here and update collect_logs as well
We expect a one to one feature assignment with existing product features. This doesn't work with dynamic tenant features. This dynamic tenant feature was only ever implemented for tenant quotas. Related to: ManageIQ#5123 ManageIQ#5129 ManageIQ#5142 Fixes: ManageIQ#9512
This recreates the issue found in ManageIQ#9512
* Drop repetive constant definition and assignment * Generalize the names of constants * Capitalize constants as per conventions
6484ca9
to
f601874
Compare
@@ -195,7 +192,7 @@ function saveButtonValidation() { | |||
.should('be.enabled') | |||
.click(); | |||
// Validating confirmation flash message | |||
cy.expect_flash(flashTypeSuccess, flashMessageSettingsSaved); | |||
cy.expect_flash(flashClassMap.success, flashMessageSettingsSaved); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I changed this one too...
@asirvadAbrahamVarghese please take a look at the test changes... I also reduced the repetitive constant definition and assignment. |
Bypass feature validation for dynamic tenant features
We expect a one to one feature assignment with existing product features.
This doesn't work with dynamic tenant features.
This dynamic tenant feature was only ever implemented for tenant quotas.
Related to:
#5123
#5129
#5142
Fixes: #9512
Add a test for Settings, Access Control, Tenant Add and Delete
This recreates the issue found in #9512